home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / text / misc / Man2ANSI.lha / FTP.man next >
Text File  |  1994-11-07  |  39KB  |  793 lines

  1.  
  2.  
  3.  
  4. ftp(1)                    User Commands                    ftp(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      ftp - file transfer program
  10.  
  11. SYNOPSIS
  12.      _ffff_tttt_pppp [ _----_dddd_gggg_iiii_nnnn_tttt_vvvv ] [ _h_o_s_t_n_a_m_e ]
  13.  
  14. AVAILABILITY
  15.      SUNWcsu
  16.  
  17. DESCRIPTION
  18.      The _ffff_tttt_pppp command is the user interface to the Internet  stan-
  19.      dard  File  Transfer Protocol (FTP).  _ffff_tttt_pppp transfers files to
  20.      and from a remote network site.
  21.  
  22.      The client host with which _ffff_tttt_pppp  is  to  communicate  may  be
  23.      specified on the command line.  If this is done, _ffff_tttt_pppp immedi-
  24.      ately attempts to establish a connection to an FTP server on
  25.      that host; otherwise, _ffff_tttt_pppp enters its command interpreter and
  26.      awaits instructions from the user.   When  _ffff_tttt_pppp  is  awaiting
  27.      commands from the user, it displays the prompt _ffff_tttt_pppp_>>>>.
  28.  
  29. OPTIONS
  30.      The following options may be specified at the command  line,
  31.      or to the command interpreter:
  32.  
  33.      -d    Enable debugging.
  34.  
  35.      -g    Disable filename globbing.
  36.  
  37.      -i    Turn off interactive prompting  during  multiple  file
  38.           transfers.
  39.  
  40.      -n    Do not attempt auto-login upon initial connection.  If
  41.           auto-login  is not disabled, _ffff_tttt_pppp checks the _...._nnnn_eeee_tttt_rrrr_cccc file
  42.           in the user's home directory for an entry describing an
  43.           account on the remote machine.  If no entry exists, _ffff_tttt_pppp
  44.           will prompt for the login name of the  account  on  the
  45.           remote  machine  (the  default is the login name on the
  46.           local machine), and, if necessary, prompts for a  pass-
  47.           word and an account with which to login.
  48.  
  49.      -t    Enable packet tracing (unimplemented).
  50.  
  51.      -v    Show all responses from the remote server, as well  as
  52.           report  on data transfer statistics.  This is turned on
  53.           by default if _ffff_tttt_pppp is  running  interactively  with  its
  54.           input coming from the user's terminal.
  55.  
  56.      The following commands  can  be  specified  to  the  command
  57.      interpreter:
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sun Microsystems    Last change: 26 Sep 1992                    1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ftp(1)                    User Commands                    ftp(1)
  71.  
  72.  
  73.  
  74.      _!!!!  [ _c_o_m_m_a_n_d ]
  75.           Run _c_o_m_m_a_n_d as a shell command on  the  local  machine.
  76.           If no _c_o_m_m_a_n_d is given, invoke an interactive shell.
  77.  
  78.      _$$$$ _m_a_c_r_o-_n_a_m_e [ _a_r_g_s ]
  79.           Execute the macro _m_a_c_r_o-_n_a_m_e that was defined with  the
  80.           _mmmm_aaaa_cccc_dddd_eeee_ffff  command.   Arguments  are  passed  to the macro
  81.           unglobbed.
  82.  
  83.      _aaaa_cccc_cccc_oooo_uuuu_nnnn_tttt [ _p_a_s_s_w_d ]
  84.           Supply a supplemental password  required  by  a  remote
  85.           system  for  access  to resources once a login has been
  86.           successfully completed.  If no  argument  is  included,
  87.           the  user will be prompted for an account password in a
  88.           non-echoing input mode.
  89.  
  90.      _aaaa_pppp_pppp_eeee_nnnn_dddd _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ]
  91.           Append a local file to a file on  the  remote  machine.
  92.           If _r_e_m_o_t_e-_f_i_l_e is not specified, the local file name is
  93.           used, subject to alteration by any _nnnn_tttt_rrrr_aaaa_nnnn_ssss or _nnnn_mmmm_aaaa_pppp  set-
  94.           tings.   File  transfer  uses  the current settings for
  95.           representation type, file structure, and transfer mode.
  96.  
  97.      _aaaa_ssss_cccc_iiii_iiii
  98.           Set the representation type to network ASCII.  This  is
  99.           the default type.
  100.  
  101.      _bbbb_eeee_llll_llll Sound a bell after each file transfer command  is  com-
  102.           pleted.
  103.  
  104.      _bbbb_iiii_nnnn_aaaa_rrrr_yyyy
  105.           Set the representation type to image.
  106.  
  107.      _bbbb_yyyy_eeee  Terminate the FTP session with the  remote  server  and
  108.           exit  _ffff_tttt_pppp.   An EOF will also terminate the session and
  109.           exit.
  110.  
  111.      _cccc_aaaa_ssss_eeee Toggle remote computer file name  case  mapping  during
  112.           _mmmm_gggg_eeee_tttt  commands.   When  _cccc_aaaa_ssss_eeee  is  on  (default is off),
  113.           remote computer file names with all  letters  in  upper
  114.           case  are  written  in  the  local  directory  with the
  115.           letters mapped to lower case.
  116.  
  117.      _cccc_dddd _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y
  118.           Change the working directory on the remote  machine  to
  119.           _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y.
  120.  
  121.      _cccc_dddd_uuuu_pppp Change the remote  machine  working  directory  to  the
  122.           parent of the current remote machine working directory.
  123.  
  124.      _cccc_llll_oooo_ssss_eeee
  125.           Terminate the FTP session with the remote  server,  and
  126.  
  127.  
  128.  
  129. Sun Microsystems    Last change: 26 Sep 1992                    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ftp(1)                    User Commands                    ftp(1)
  137.  
  138.  
  139.  
  140.           return  to the command interpreter.  Any defined macros
  141.           are erased.
  142.  
  143.      _cccc_rrrr   Toggle RETURN stripping during network ASCII type  file
  144.           retrieval.   Records  are  denoted by a RETURN/LINEFEED
  145.           sequence during network ASCII type file transfer.  When
  146.           _cccc_rrrr  is on (the default), RETURN characters are stripped
  147.           from this sequence to conform with the UNIX system sin-
  148.           gle  LINEFEED  record  delimiter.  Records on non-UNIX-
  149.           system remote hosts may contain single LINEFEED charac-
  150.           ters;  when  an  network  ASCII  type transfer is made,
  151.           these LINEFEED characters may be distinguished  from  a
  152.           record delimiter only when _cccc_rrrr is off.
  153.  
  154.      _dddd_eeee_llll_eeee_tttt_eeee _r_e_m_o_t_e-_f_i_l_e
  155.           Delete the file _r_e_m_o_t_e-_f_i_l_e on the remote machine.
  156.  
  157.      _dddd_eeee_bbbb_uuuu_gggg
  158.           Toggle debugging mode. When debugging is on, _ffff_tttt_pppp prints
  159.           each  command  sent  to the remote machine, preceded by
  160.           the string _----_----_>>>>.
  161.  
  162.      _dddd_iiii_rrrr [ _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y ] [ _l_o_c_a_l-_f_i_l_e ]
  163.           Print a listing of the directory contents in the direc-
  164.           tory,  _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y,  and,  optionally, placing the
  165.           output in _l_o_c_a_l-_f_i_l_e.  If no  directory  is  specified,
  166.           the  current working directory on the remote machine is
  167.           used.  If no local file is specified, or _l_o_c_a_l-_f_i_l_e  is
  168.           _----, output is sent to the terminal.
  169.  
  170.      _dddd_iiii_ssss_cccc_oooo_nnnn_nnnn_eeee_cccc_tttt
  171.           A synonym for _cccc_llll_oooo_ssss_eeee.
  172.  
  173.      _ffff_oooo_rrrr_mmmm [ _f_o_r_m_a_t-_n_a_m_e ]
  174.           Set  the  carriage  control  format  subtype   of   the
  175.           representation  type  to  _f_o_r_m_a_t-_n_a_m_e.   The only valid
  176.           _f_o_r_m_a_t-_n_a_m_e is  _nnnn_oooo_nnnn_----_pppp_rrrr_iiii_nnnn_tttt,  which  corresponds  to  the
  177.           default non-print subtype.
  178.  
  179.      _gggg_eeee_tttt _r_e_m_o_t_e-_f_i_l_e [ _l_o_c_a_l-_f_i_l_e ]
  180.           Retrieve the _r_e_m_o_t_e-_f_i_l_e and  store  it  on  the  local
  181.           machine.   If  the local file name is not specified, it
  182.           is given the same name it has on  the  remote  machine,
  183.           subject  to alteration by the current _cccc_aaaa_ssss_eeee, _nnnn_tttt_rrrr_aaaa_nnnn_ssss, and
  184.           _nnnn_mmmm_aaaa_pppp settings.  The current settings for representation
  185.           type,  file structure, and transfer mode are used while
  186.           transferring the file.
  187.  
  188.      _gggg_llll_oooo_bbbb Toggle filename expansion, or  globbing,  for  _mmmm_dddd_eeee_llll_eeee_tttt_eeee,
  189.           _mmmm_gggg_eeee_tttt  and  _mmmm_pppp_uuuu_tttt.   If globbing is turned off, filenames
  190.           are taken literally.
  191.  
  192.  
  193.  
  194.  
  195. Sun Microsystems    Last change: 26 Sep 1992                    3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ftp(1)                    User Commands                    ftp(1)
  203.  
  204.  
  205.  
  206.           Globbing for _mmmm_pppp_uuuu_tttt is done as in sh(1).  For _mmmm_dddd_eeee_llll_eeee_tttt_eeee and
  207.           _mmmm_gggg_eeee_tttt,  each  remote file name is expanded separately on
  208.           the remote machine, and the lists are not merged.
  209.  
  210.           Expansion of a directory name is likely to be radically
  211.           different  from  expansion  of  the name of an ordinary
  212.           file:  the exact result depends on the remote operating
  213.           system  and  FTP  server, and can be previewed by doing
  214.           _mmmm_llll_ssss _r_e_m_o_t_e-_f_i_l_e_s _----.
  215.  
  216.           _mmmm_gggg_eeee_tttt and _mmmm_pppp_uuuu_tttt are not meant to transfer  entire  direc-
  217.           tory  subtrees  of files.  You can do this by transfer-
  218.           ring a tar(1) archive of the subtree (using a represen-
  219.           tation type of image as set by the _bbbb_iiii_nnnn_aaaa_rrrr_yyyy command).
  220.  
  221.      _hhhh_aaaa_ssss_hhhh Toggle hash-sign  (_####)  printing  for  each  data  block
  222.           transferred.  The size of a data block is 8192 bytes.
  223.  
  224.      _hhhh_eeee_llll_pppp [ _c_o_m_m_a_n_d ]
  225.           Print an informative message about the meaning of  _c_o_m_-
  226.           _m_a_n_d.   If  no  argument is given, _ffff_tttt_pppp prints a list of
  227.           the known commands.
  228.  
  229.      _llll_cccc_dddd [ _d_i_r_e_c_t_o_r_y ]
  230.           Change the working directory on the local machine.   If
  231.           no _d_i_r_e_c_t_o_r_y is specified, the user's home directory is
  232.           used.
  233.  
  234.      _llll_ssss [ _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y ] [ _l_o_c_a_l-_f_i_l_e ]
  235.           Print an abbreviated  listing  of  the  contents  of  a
  236.           directory  on  the remote machine.  If _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y
  237.           is left unspecified, the current working  directory  is
  238.           used.   If no local file is specified, or if _l_o_c_a_l-_f_i_l_e
  239.           is _----, the output is sent to the terminal.
  240.  
  241.      _mmmm_aaaa_cccc_dddd_eeee_ffff _m_a_c_r_o-_n_a_m_e
  242.           Define a macro.  Subsequent lines  are  stored  as  the
  243.           macro  _m_a_c_r_o-_n_a_m_e;  a  null  line  (consecutive NEWLINE
  244.           characters in a file or RETURN characters from the ter-
  245.           minal)  terminates  macro input mode.  There is a limit
  246.           of 16 macros and 4096 total characters in  all  defined
  247.           macros.  Macros remain defined until a _cccc_llll_oooo_ssss_eeee command is
  248.           executed.
  249.  
  250.           The macro processor interprets _$$$$ and _\\\\ as special char-
  251.           acters.   A  _$$$$  followed  by  a  number (or numbers) is
  252.           replaced by the corresponding  argument  on  the  macro
  253.           invocation  command line.  A _$$$$ followed by an _iiii signals
  254.           that macro processor that the executing macro is to  be
  255.           looped.  On  the first pass _$$$$_iiii is replaced by the first
  256.           argument on the macro invocation command line,  on  the
  257.           second  pass it is replaced by the second argument, and
  258.  
  259.  
  260.  
  261. Sun Microsystems    Last change: 26 Sep 1992                    4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ftp(1)                    User Commands                    ftp(1)
  269.  
  270.  
  271.  
  272.           so on.  A _\\\\ followed by any character  is  replaced  by
  273.           that character.  Use the _\\\\ to prevent special treatment
  274.           of the _$$$$.
  275.  
  276.      _mmmm_dddd_eeee_llll_eeee_tttt_eeee _r_e_m_o_t_e-_f_i_l_e_s
  277.           Delete the _r_e_m_o_t_e-_f_i_l_e_s on the remote machine.
  278.  
  279.      _mmmm_dddd_iiii_rrrr _r_e_m_o_t_e-_f_i_l_e_s _l_o_c_a_l-_f_i_l_e
  280.           Like _dddd_iiii_rrrr, except multiple remote files  may  be  speci-
  281.           fied.   If interactive prompting is on, _ffff_tttt_pppp will prompt
  282.           the user to verify that the last argument is indeed the
  283.           target local file for receiving _mmmm_dddd_iiii_rrrr output.
  284.  
  285.      _mmmm_gggg_eeee_tttt _r_e_m_o_t_e-_f_i_l_e_s
  286.           Expand the _r_e_m_o_t_e-_f_i_l_e_s on the remote machine and do  a
  287.           _gggg_eeee_tttt  for  each  file  name thus produced.  See _gggg_llll_oooo_bbbb for
  288.           details on  the  filename  expansion.   Resulting  file
  289.           names will then be processed according to _cccc_aaaa_ssss_eeee, _nnnn_tttt_rrrr_aaaa_nnnn_ssss,
  290.           and _nnnn_mmmm_aaaa_pppp settings.   Files  are  transferred  into  the
  291.           local  working directory, which can be changed with _llll_cccc_dddd
  292.           _d_i_r_e_c_t_o_r_y; new local directories can be created with  _!!!!
  293.           _mmmm_kkkk_dddd_iiii_rrrr _d_i_r_e_c_t_o_r_y.
  294.  
  295.      _mmmm_kkkk_dddd_iiii_rrrr _d_i_r_e_c_t_o_r_y-_n_a_m_e
  296.           Make a directory on the remote machine.
  297.  
  298.      _mmmm_llll_ssss _r_e_m_o_t_e-_f_i_l_e_s _l_o_c_a_l-_f_i_l_e
  299.           Like ls(1), except multiple remote files may be  speci-
  300.           fied.   If interactive prompting is on, _ffff_tttt_pppp will prompt
  301.           the user to verify that the last argument is indeed the
  302.           target local file for receiving _mmmm_llll_ssss output.
  303.  
  304.      _mmmm_oooo_dddd_eeee [ _m_o_d_e-_n_a_m_e ]
  305.           Set the transfer mode to  _m_o_d_e-_n_a_m_e.   The  only  valid
  306.           _m_o_d_e-_n_a_m_e  is  _ssss_tttt_rrrr_eeee_aaaa_mmmm, which corresponds to the default
  307.           stream mode.  This implementation only supports _ssss_tttt_rrrr_eeee_aaaa_mmmm,
  308.           and requires that it be specified.
  309.  
  310.      _mmmm_pppp_uuuu_tttt _l_o_c_a_l-_f_i_l_e_s
  311.           Expand wild cards in the list of local files  given  as
  312.           arguments  and  do a _pppp_uuuu_tttt for each file in the resulting
  313.           list.  See _gggg_llll_oooo_bbbb  for  details  of  filename  expansion.
  314.           Resulting  file  names will then be processed according
  315.           to _nnnn_tttt_rrrr_aaaa_nnnn_ssss and _nnnn_mmmm_aaaa_pppp settings.
  316.  
  317.      _nnnn_mmmm_aaaa_pppp [ _i_n_p_a_t_t_e_r_n _o_u_t_p_a_t_t_e_r_n ]
  318.           Set or unset the filename  mapping  mechanism.   If  no
  319.           arguments are specified, the filename mapping mechanism
  320.           is unset.  If arguments are specified, remote filenames
  321.           are mapped during _mmmm_pppp_uuuu_tttt commands and _pppp_uuuu_tttt commands issued
  322.           without a specified remote target filename.   If  argu-
  323.           ments  are specified, local filenames are mapped during
  324.  
  325.  
  326.  
  327. Sun Microsystems    Last change: 26 Sep 1992                    5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ftp(1)                    User Commands                    ftp(1)
  335.  
  336.  
  337.  
  338.           _mmmm_gggg_eeee_tttt commands and _gggg_eeee_tttt commands issued without a  speci-
  339.           fied local target filename.
  340.  
  341.           This command is useful when connecting to  a  non-UNIX-
  342.           system  remote  host with different file naming conven-
  343.           tions or practices.  The mapping  follows  the  pattern
  344.           set  by  _i_n_p_a_t_t_e_r_n and _o_u_t_p_a_t_t_e_r_n.  _i_n_p_a_t_t_e_r_n is a tem-
  345.           plate for incoming filenames (which  may  have  already
  346.           been  processed  according  to the _nnnn_tttt_rrrr_aaaa_nnnn_ssss and _cccc_aaaa_ssss_eeee set-
  347.           tings).  Variable templating is accomplished by includ-
  348.           ing  the sequences _$$$$_1111, _$$$$_2222, ..., _$$$$_9999 in _i_n_p_a_t_t_e_r_n.  Use _\\\\
  349.           to prevent this special treatment of the  _$$$$  character.
  350.           All  other  characters  are  treated literally, and are
  351.           used to determine the _nnnn_mmmm_aaaa_pppp _i_n_p_a_t_t_e_r_n variable values.
  352.  
  353.           For example, given _i_n_p_a_t_t_e_r_n _$$$$_1111_...._$$$$_2222 and the remote  file
  354.           name  _mmmm_yyyy_dddd_aaaa_tttt_aaaa_...._dddd_aaaa_tttt_aaaa,  _$$$$_1111 would have the value _mmmm_yyyy_dddd_aaaa_tttt_aaaa, and
  355.           _$$$$_2222 would have the value _dddd_aaaa_tttt_aaaa.
  356.  
  357.           The  _o_u_t_p_a_t_t_e_r_n   determines   the   resulting   mapped
  358.           filename.   The  sequences _$$$$_1111, _$$$$_2222, ..., _$$$$_9999 are replaced
  359.           by any value resulting  from  the  _i_n_p_a_t_t_e_r_n  template.
  360.           The  sequence  _$$$$_0000 is replaced by the original filename.
  361.           Additionally, the sequence [_s_e_q_1,_s_e_q_2] is  replaced  by
  362.           _s_e_q_1  if  _s_e_q_1  is  not  a null string; otherwise it is
  363.           replaced by _s_e_q_2.
  364.  
  365.           For    example,    the    command     _nnnn_mmmm_aaaa_pppp     _$$$$_1111_...._$$$$_2222_...._$$$$_3333
  366.           _[[[[_$$$$_1111_,,,,_$$$$_2222_]]]]_...._[[[[_$$$$_2222_,,,,_ffff_iiii_llll_eeee_]]]]   would  yield  the  output  filename
  367.           _mmmm_yyyy_ffff_iiii_llll_eeee_...._dddd_aaaa_tttt_aaaa  for  input   filenames   _mmmm_yyyy_ffff_iiii_llll_eeee_...._dddd_aaaa_tttt_aaaa   and
  368.           _mmmm_yyyy_ffff_iiii_llll_eeee_...._dddd_aaaa_tttt_aaaa_...._oooo_llll_dddd,  _mmmm_yyyy_ffff_iiii_llll_eeee_...._ffff_iiii_llll_eeee  for  the  input filename
  369.           _mmmm_yyyy_ffff_iiii_llll_eeee,  and  _mmmm_yyyy_ffff_iiii_llll_eeee_...._mmmm_yyyy_ffff_iiii_llll_eeee  for  the  input   filename
  370.           _...._mmmm_yyyy_ffff_iiii_llll_eeee.   SPACE  characters may be included in _o_u_t_p_a_t_-
  371.           _t_e_r_n, as in the example _nnnn_mmmm_aaaa_pppp _$$$$_1111 _|||| _ssss_eeee_dddd _""""_ssss_////  _****_$$$$_////_////_"""" _>>>>  _$$$$_1111.
  372.           Use the _\\\\ character to prevent special treatment of the
  373.           _$$$$, _[[[[, _]]]], and _,,,,, characters.
  374.  
  375.      _nnnn_tttt_rrrr_aaaa_nnnn_ssss [ _i_n_c_h_a_r_s [ _o_u_t_c_h_a_r_s ] ]
  376.           Set or unset the filename character translation mechan-
  377.           ism.  If no arguments are specified, the filename char-
  378.           acter translation mechanism is unset.  If arguments are
  379.           specified,   characters   in   remote   filenames   are
  380.           translated during _mmmm_pppp_uuuu_tttt commands and _pppp_uuuu_tttt commands issued
  381.           without a specified remote target filename, and charac-
  382.           ters in local filenames are translated during _mmmm_gggg_eeee_tttt com-
  383.           mands and _gggg_eeee_tttt commands issued without a specified local
  384.           target filename.
  385.  
  386.           This command is useful when connecting to  a  non-UNIX-
  387.           system  remote  host with different file naming conven-
  388.           tions or practices.  Characters in a filename  matching
  389.           a   character   in   _i_n_c_h_a_r_s   are  replaced  with  the
  390.  
  391.  
  392.  
  393. Sun Microsystems    Last change: 26 Sep 1992                    6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. ftp(1)                    User Commands                    ftp(1)
  401.  
  402.  
  403.  
  404.           corresponding   character   in   _o_u_t_c_h_a_r_s.    If    the
  405.           character's  position  in  _i_n_c_h_a_r_s  is  longer than the
  406.           length of _o_u_t_c_h_a_r_s, the character is deleted  from  the
  407.           file name.
  408.  
  409.      _oooo_pppp_eeee_nnnn _h_o_s_t [ _p_o_r_t ]
  410.           Establish  a  connection  to  the  specified  _h_o_s_t  FTP
  411.           server.   An  optional  port number may be supplied, in
  412.           which case, _ffff_tttt_pppp will attempt to contact an  FTP  server
  413.           at  that port.  If the _a_u_t_o-_l_o_g_i_n option is on (default
  414.           setting), _ffff_tttt_pppp will also attempt  to  automatically  log
  415.           the user in to the FTP server.
  416.  
  417.      _pppp_rrrr_oooo_mmmm_pppp_tttt
  418.           Toggle  interactive  prompting.  Interactive  prompting
  419.           occurs during multiple file transfers to allow the user
  420.           to selectively retrieve or store  files.   By  default,
  421.           prompting  is  turned  on.  If prompting is turned off,
  422.           any _mmmm_gggg_eeee_tttt or _mmmm_pppp_uuuu_tttt  will  transfer  all  files,  and  any
  423.           _mmmm_dddd_eeee_llll_eeee_tttt_eeee will delete all files.
  424.  
  425.      _pppp_rrrr_oooo_xxxx_yyyy _f_t_p-_c_o_m_m_a_n_d
  426.           Execute an FTP command on a secondary  control  connec-
  427.           tion.   This  command allows simultaneous connection to
  428.           two remote FTP servers for transferring  files  between
  429.           the  two servers.  The first _pppp_rrrr_oooo_xxxx_yyyy command should be an
  430.           _oooo_pppp_eeee_nnnn, to establish the  secondary  control  connection.
  431.           Enter  the  command  _pppp_rrrr_oooo_xxxx_yyyy _????  to see other FTP commands
  432.           executable on the secondary connection.
  433.  
  434.           The following commands behave differently when prefaced
  435.           by  _pppp_rrrr_oooo_xxxx_yyyy:   _oooo_pppp_eeee_nnnn will not define new macros during the
  436.           auto-login process, _cccc_llll_oooo_ssss_eeee will not erase existing macro
  437.           definitions,  _gggg_eeee_tttt and _mmmm_gggg_eeee_tttt transfer files from the host
  438.           on the primary control connection to the  host  on  the
  439.           secondary  control  connection,  and  _pppp_uuuu_tttt,  _mmmm_pppp_uuuu_tttt_dddd,  and
  440.           _aaaa_pppp_pppp_eeee_nnnn_dddd transfer files from the host  on  the  secondary
  441.           control  connection  to the host on the primary control
  442.           connection.
  443.  
  444.           Third party file transfers depend upon support  of  the
  445.           _PPPP_AAAA_SSSS_VVVV  command  by  the  server on the secondary control
  446.           connection.
  447.  
  448.      _pppp_uuuu_tttt _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ]
  449.           Store a local file on the remote machine.   If  _r_e_m_o_t_e-
  450.           _f_i_l_e  is  left unspecified, the local file name is used
  451.           after processing according to any _nnnn_tttt_rrrr_aaaa_nnnn_ssss or  _nnnn_mmmm_aaaa_pppp  set-
  452.           tings  in  naming  the remote file.  File transfer uses
  453.           the current  settings  for  representation  type,  file
  454.           structure, and transfer mode.
  455.  
  456.  
  457.  
  458.  
  459. Sun Microsystems    Last change: 26 Sep 1992                    7
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. ftp(1)                    User Commands                    ftp(1)
  467.  
  468.  
  469.  
  470.      _pppp_wwww_dddd  Print the name of the current working directory on  the
  471.           remote machine.
  472.  
  473.      _qqqq_uuuu_iiii_tttt A synonym for _bbbb_yyyy_eeee.
  474.  
  475.      _qqqq_uuuu_oooo_tttt_eeee _a_r_g_1 _a_r_g_2 ...
  476.           Send the arguments specified, verbatim, to  the  remote
  477.           FTP  server.   A  single  FTP reply code is expected in
  478.           return.  (The _rrrr_eeee_mmmm_oooo_tttt_eeee_hhhh_eeee_llll_pppp command  displays  a  list  of
  479.           valid arguments.)
  480.  
  481.           _qqqq_uuuu_oooo_tttt_eeee should be used only by experienced users who  are
  482.           familiar with the FTP protocol.
  483.  
  484.      _rrrr_eeee_cccc_vvvv _r_e_m_o_t_e-_f_i_l_e [ _l_o_c_a_l-_f_i_l_e]
  485.           A synonym for _gggg_eeee_tttt.
  486.  
  487.      _rrrr_eeee_mmmm_oooo_tttt_eeee_hhhh_eeee_llll_pppp [ _c_o_m_m_a_n_d-_n_a_m_e ]
  488.           Request  help  from  the  remote  FTP  server.   If   a
  489.           _c_o_m_m_a_n_d-_n_a_m_e  is specified it is supplied to the server
  490.           as well.
  491.  
  492.      _rrrr_eeee_nnnn_aaaa_mmmm_eeee _f_r_o_m _t_o
  493.           Rename the file _f_r_o_m on the remote machine to have  the
  494.           name _t_o.
  495.  
  496.      _rrrr_eeee_ssss_eeee_tttt
  497.           Clear  reply  queue.   This   command   re-synchronizes
  498.           command/reply  sequencing  with  the remote FTP server.
  499.           Resynchronization may be necessary following  a  viola-
  500.           tion of the FTP protocol by the remote server.
  501.  
  502.      _rrrr_mmmm_dddd_iiii_rrrr _d_i_r_e_c_t_o_r_y-_n_a_m_e
  503.           Delete a directory on the remote machine.
  504.  
  505.      _rrrr_uuuu_nnnn_iiii_qqqq_uuuu_eeee
  506.           Toggle storing of files on the local system with unique
  507.           filenames.   If a file already exists with a name equal
  508.           to the target local filename for a _gggg_eeee_tttt or _mmmm_gggg_eeee_tttt command,
  509.           a  _...._1111  is  appended to the name.  If the resulting name
  510.           matches another existing file, a _...._2222 is appended to  the
  511.           original name.  If this process continues up to _...._9999_9999, an
  512.           error message is printed, and  the  transfer  does  not
  513.           take  place.   The  generated  unique  filename will be
  514.           reported.  _rrrr_uuuu_nnnn_iiii_qqqq_uuuu_eeee will not  affect  local  files  gen-
  515.           erated from a shell command.  The default value is off.
  516.  
  517.      _ssss_eeee_nnnn_dddd _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ]
  518.           A synonym for _pppp_uuuu_tttt.
  519.  
  520.      _ssss_eeee_nnnn_dddd_pppp_oooo_rrrr_tttt
  521.           Toggle the use of _PPPP_OOOO_RRRR_TTTT commands.  By default, _ffff_tttt_pppp  will
  522.  
  523.  
  524.  
  525. Sun Microsystems    Last change: 26 Sep 1992                    8
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. ftp(1)                    User Commands                    ftp(1)
  533.  
  534.  
  535.  
  536.           attempt  to use a _PPPP_OOOO_RRRR_TTTT command when establishing a con-
  537.           nection for each data transfer.  The use of  _PPPP_OOOO_RRRR_TTTT  com-
  538.           mands  can prevent delays when performing multiple file
  539.           transfers. If the _PPPP_OOOO_RRRR_TTTT command fails, _ffff_tttt_pppp will use  the
  540.           default  data  port.  When  the use of _PPPP_OOOO_RRRR_TTTT commands is
  541.           disabled, no attempt will be made to use _PPPP_OOOO_RRRR_TTTT  commands
  542.           for  each data transfer.  This is useful when connected
  543.           to certain FTP implementations that  ignore  _PPPP_OOOO_RRRR_TTTT  com-
  544.           mands but incorrectly indicate they have been accepted.
  545.  
  546.      _ssss_tttt_aaaa_tttt_uuuu_ssss
  547.           Show the current status of _ffff_tttt_pppp.
  548.  
  549.      _ssss_tttt_rrrr_uuuu_cccc_tttt [ _s_t_r_u_c_t-_n_a_m_e ]
  550.           Set the file structure to _s_t_r_u_c_t-_n_a_m_e.  The only  valid
  551.           _s_t_r_u_c_t-_n_a_m_e  is  _ffff_iiii_llll_eeee, which corresponds to the default
  552.           file structure.  The implementation only supports _ffff_iiii_llll_eeee,
  553.           and requires that it be specified.
  554.  
  555.      _ssss_uuuu_nnnn_iiii_qqqq_uuuu_eeee
  556.           Toggle storing of files on remote machine under  unique
  557.           file  names.   The  remote  FTP server must support the
  558.           _SSSS_TTTT_OOOO_UUUU command for  successful  completion.   The  remote
  559.           server  will  report the unique name.  Default value is
  560.           off.
  561.  
  562.      _tttt_eeee_nnnn_eeee_xxxx
  563.           Set the representation type to that needed to  talk  to
  564.           TENEX machines.
  565.  
  566.      _tttt_rrrr_aaaa_cccc_eeee
  567.           Toggle packet tracing (unimplemented).
  568.  
  569.      _tttt_yyyy_pppp_eeee [ _t_y_p_e-_n_a_m_e ]
  570.           Set the representation type to  _t_y_p_e-_n_a_m_e.   The  valid
  571.           _t_y_p_e-_n_a_m_es are _aaaa_ssss_cccc_iiii_iiii for network ASCII, _bbbb_iiii_nnnn_aaaa_rrrr_yyyy or _iiii_mmmm_aaaa_gggg_eeee
  572.           for image, and _tttt_eeee_nnnn_eeee_xxxx for local byte size  with  a  byte
  573.           size of 8 (used to talk to TENEX machines).  If no type
  574.           is specified, the current type is printed.  The default
  575.           type is network ASCII.
  576.  
  577.      _uuuu_ssss_eeee_rrrr _u_s_e_r-_n_a_m_e [ _p_a_s_s_w_o_r_d ] [ _a_c_c_o_u_n_t ]
  578.           Identify yourself to the  remote  FTP  server.  If  the
  579.           password  is  not specified and the server requires it,
  580.           _ffff_tttt_pppp will prompt the user for it (after disabling  local
  581.           echo).   If  an account field is not specified, and the
  582.           FTP server requires it, the user will be  prompted  for
  583.           it.   If an account field is specified, an account com-
  584.           mand will be relayed to the  remote  server  after  the
  585.           login  sequence  is  completed if the remote server did
  586.           not require it for logging in.  Unless _ffff_tttt_pppp  is  invoked
  587.           with   auto-login   disabled,   this  process  is  done
  588.  
  589.  
  590.  
  591. Sun Microsystems    Last change: 26 Sep 1992                    9
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. ftp(1)                    User Commands                    ftp(1)
  599.  
  600.  
  601.  
  602.           automatically on initial connection to the FTP server.
  603.  
  604.      _vvvv_eeee_rrrr_bbbb_oooo_ssss_eeee
  605.           Toggle verbose mode.  In verbose  mode,  all  responses
  606.           from  the  FTP  server  are  displayed to the user.  In
  607.           addition, if verbose mode is on, when a  file  transfer
  608.           completes,  statistics  regarding the efficiency of the
  609.           transfer are reported. By default, verbose mode  is  on
  610.           if  _ffff_tttt_pppp's  commands are coming from a terminal, and off
  611.           otherwise.
  612.  
  613.      _????  [ _c_o_m_m_a_n_d ]
  614.           A synonym for _hhhh_eeee_llll_pppp.
  615.  
  616.      Command arguments which have embedded spaces may  be  quoted
  617.      with quote (") marks.
  618.  
  619.      If any command argument which  is  not  indicated  as  being
  620.      optional  is  not  specified, _ffff_tttt_pppp will prompt for that argu-
  621.      ment.
  622.  
  623. ABORTING A FILE TRANSFER
  624.      To abort a file transfer, use the  terminal  interrupt  key.
  625.      Sending  transfers  will  be  immediately halted.  Receiving
  626.      transfers will be halted by sending  an  FTP  protocol  _AAAA_BBBB_OOOO_RRRR
  627.      command  to  the  remote  server, and discarding any further
  628.      data received.  The speed  at  which  this  is  accomplished
  629.      depends  upon  the remote server's support for _AAAA_BBBB_OOOO_RRRR process-
  630.      ing.  If the remote server does not support  the  _AAAA_BBBB_OOOO_RRRR  com-
  631.      mand, an _ffff_tttt_pppp_>>>> prompt will not appear until the remote server
  632.      has completed sending the requested file.
  633.  
  634.      The terminal interrupt key sequence will be ignored when _ffff_tttt_pppp
  635.      has  completed  any local processing and is awaiting a reply
  636.      from the remote server.  A  long  delay  in  this  mode  may
  637.      result  from  the  _AAAA_BBBB_OOOO_RRRR  processing described above, or from
  638.      unexpected behavior by the remote server,  including  viola-
  639.      tions  of the ftp protocol.  If the delay results from unex-
  640.      pected remote server behavior, the local _ffff_tttt_pppp program must be
  641.      killed by hand.
  642.  
  643. FILE NAMING CONVENTIONS
  644.      Local files specified as arguments to _ffff_tttt_pppp commands are  pro-
  645.      cessed according to the following rules.
  646.  
  647.      1)   If the file name _---- is  specified,  the  standard  input
  648.           (for reading) or standard output (for writing) is used.
  649.  
  650.      2)   If the first character of  the  file  name  is  _||||,  the
  651.           remainder  of  the  argument  is interpreted as a shell
  652.           command.  _ffff_tttt_pppp then forks a shell, using popen(3S)  with
  653.           the  argument  supplied,  and  reads  (writes) from the
  654.  
  655.  
  656.  
  657. Sun Microsystems    Last change: 26 Sep 1992                   10
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. ftp(1)                    User Commands                    ftp(1)
  665.  
  666.  
  667.  
  668.           standard output (standard input) of that shell.  If the
  669.           shell  command  includes SPACE characters, the argument
  670.           must be quoted; for example _""""_|||| _llll_ssss _----_llll_tttt_"""".  A particularly
  671.           useful example of this mechanism is:  _""""_dddd_iiii_rrrr _|||| _mmmm_oooo_rrrr_eeee_"""".
  672.  
  673.      3)   Failing the above checks, if globbing is enabled, local
  674.           file  names are expanded according to the rules used in
  675.           the sh(1); see the _gggg_llll_oooo_bbbb command.  If  the  _ffff_tttt_pppp  command
  676.           expects  a  single  local file (for example, _pppp_uuuu_tttt), only
  677.           the first filename generated by the globbing  operation
  678.           is used.
  679.  
  680.      4)   For _mmmm_gggg_eeee_tttt commands and  _gggg_eeee_tttt  commands  with  unspecified
  681.           local  file  names,  the  local  filename is the remote
  682.           filename, which may be altered by a  _cccc_aaaa_ssss_eeee,  _nnnn_tttt_rrrr_aaaa_nnnn_ssss,  or
  683.           _nnnn_mmmm_aaaa_pppp  setting.   The  resulting  filename  may  then be
  684.           altered if _rrrr_uuuu_nnnn_iiii_qqqq_uuuu_eeee is on.
  685.  
  686.      5)   For _mmmm_pppp_uuuu_tttt commands and  _pppp_uuuu_tttt  commands  with  unspecified
  687.           remote  file  names,  the  remote filename is the local
  688.           filename, which may be altered by a _nnnn_tttt_rrrr_aaaa_nnnn_ssss or _nnnn_mmmm_aaaa_pppp set-
  689.           ting.   The  resulting  filename may then be altered by
  690.           the remote server if _ssss_uuuu_nnnn_iiii_qqqq_uuuu_eeee is on.
  691.  
  692. FILE TRANSFER PARAMETERS
  693.      The FTP specification specifies many  parameters  which  may
  694.      affect a file transfer.
  695.  
  696.      The representation type may be one of network ASCII, EBCDIC,
  697.      image,  or  local  byte size with a specified byte size (for
  698.      PDP-10's and PDP-20's mostly).  The network ASCII and EBCDIC
  699.      types  have a further subtype which specifies whether verti-
  700.      cal format control (NEWLINE characters,  form  feeds,  etc.)
  701.      are  to  be  passed  through (non-print), provided in TELNET
  702.      format (TELNET format controls), or provided  in  ASA  (FOR-
  703.      TRAN)  (carriage  control  (ASA))  format.  _ffff_tttt_pppp supports the
  704.      network ASCII (subtype non-print only) and image types, plus
  705.      local byte size with a byte size of 8 for communicating with
  706.      TENEX machines.
  707.  
  708.      The file structure may be one of _ffff_iiii_llll_eeee (no record structure),
  709.      _rrrr_eeee_cccc_oooo_rrrr_dddd,  or _pppp_aaaa_gggg_eeee. _ffff_tttt_pppp supports only the default value, which
  710.      is _ffff_iiii_llll_eeee.
  711.  
  712.      The  transfer  mode  may  be  one  of  _ssss_tttt_rrrr_eeee_aaaa_mmmm,   _bbbb_llll_oooo_cccc_kkkk,   or
  713.      _cccc_oooo_mmmm_pppp_rrrr_eeee_ssss_ssss_eeee_dddd.  _ffff_tttt_pppp  supports  only the default value, which is
  714.      _ssss_tttt_rrrr_eeee_aaaa_mmmm.
  715.  
  716. SEE ALSO
  717.      ls(1), rcp(1), sh(1), tar(1), ftpd(1M), popen(3S), netrc(4)
  718.  
  719.  
  720.  
  721.  
  722.  
  723. Sun Microsystems    Last change: 26 Sep 1992                   11
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. ftp(1)                    User Commands                    ftp(1)
  731.  
  732.  
  733.  
  734. NOTES
  735.      Correct execution  of  many  commands  depends  upon  proper
  736.      behavior by the remote server.
  737.  
  738.      An error in the treatment of carriage returns in the 4.2 BSD
  739.      code  handling  transfers with a representation type of net-
  740.      work ASCII has been corrected.  This correction  may  result
  741.      in  incorrect  transfers of binary files to and from 4.2 BSD
  742.      servers using a representation type of network ASCII.  Avoid
  743.      this problem by using the image type.
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789. Sun Microsystems    Last change: 26 Sep 1992                   12
  790.  
  791.  
  792.  
  793.